<?php echo $this->render('layouts/__header.phtml'); ?>
<?php echo $this->render('layouts/__nav.phtml'); ?>
<h1>Role Maintain Wizard</h1><br>   
<form action="/wizard/role" method="POST" id="wrole" name="wrole">
<input type="hidden" id="act" name="act" value="search"/>
<input type="hidden" id="roleid" name="roleid" value=""/>
    <h3>Role List:</h3>
     <table class="normaltable">
			<tr>
			  <td></td>			  
			  <td><input name="qName" id="qName" type="text" size="15" maxlen="20" /></td>					
              <td></td>		
              <td></td>	
              <td></td>
			</tr>		
			<tr class="tit">			 
					<td>ID</td>
					<td>Name</td>
					<td>Description</td>
					<td>CreateTime</td>
                    <td>Actions</td>					
			</tr>
			<?php foreach($this->roleList as $k=>$role):?>
			<tr onMouseOver="this.style.backgroundColor='#F7F9F9';" onMouseOut="this.style.backgroundColor='#FFFFFF'">				
				<td><?php echo $role['roleId'];?></td>
				<td><?php echo $role['roleName'];?></td>
				<td><?php echo $role['description'];?></td>
				<td><?php echo $role['create_time'];?></td>
                <td><a href="#" onclick="editRole(<?php echo $role['roleId'];?>)"><img src="<?php echo $this->baseUrl();?>/images/b_edit.png" border="0"></a> 
                &nbsp; <a href="#" onclick="delRole(<?php echo $role['roleId'];?>,'<?php echo $role['roleName'];?>')"><img src="<?php echo $this->baseUrl();?>/images/b_empty.png" border="0"></a></td>
			</tr>
			<?php endforeach;?>
		</table>
		<div class="pagelist" <?php if (!$this->pager) {echo 'style="display:none"';} ?> ><?php echo $this->pager['prevStr'];?>&nbsp;<?php echo $this->pager['pageStr'];?>&nbsp;<?php echo $this->pager['nextStr'];?>&nbsp;<input id="pageto" type="text" /><a id="gopagebtn" href="javascript:;">Go</a></div>
	<br>    
    <h3>Add new role:</h3>
    <?php echo $this->render('layouts/__info.phtml'); ?>
    <table class="normaltable lefttable">
    <tr><td>Name</td><td><input type="text" id="name" name="name" value="<?php echo $this->name; ?>"></td></tr>
     <tr><td>Description</td><td><textarea id="description" name="description"><?php echo $this->description; ?></textarea></td></tr>   
    <tr><td colspan="2" style="text-align:right"><input type="button" value="Create" id="addrole" name="addrole" /></td></tr>
    </table>
</form>

<?php echo $this->render('layouts/__footer.phtml'); ?>